from django.db import models

# Create your models here.
class Barcode(models.Model):
	class Admin:
		list_display = ('title', 'barcode')
		search_fields = ['barcode', 'title']
	def __str__(self):
		return self.barcode
	barcode = models.CharField(maxlength=50,core=True)
	title = models.CharField(maxlength=100)

class Field(models.Model):
	def __str__(self):
		return self.key
	barcode = models.ForeignKey(Barcode, edit_inline = models.TABULAR)
	key = models.CharField(maxlength=50,core=True)
	value = models.CharField(maxlength=200)